Skip to content

Conversation

@dhruvparanjape
Copy link

@dhruvparanjape dhruvparanjape commented Aug 25, 2024

Description

  • Refactored the classes to allow for all the configurations to be specified via the ABSmartlyConfig object. The instance now contains a copy of the ClientConfig and intern the DefaultHttpConfig which allows for all the configuration to be setup via the ABsmartly.configure_client method.
  • Fixed rubocop violations and make the class methods in ABsmartly thread safe.
  • context_event_logger can now be directly configured with a proc or lambda which will automatically wrap it in ContextEventLoggerCallback instance.

Note

All changes should ideally be backwards compatible but have only been verified using the existing test suite.

Test

  • all unit tests pass
  • modified the error since it's no longer possible for ABSmartly.create to use another one.

@dhruvparanjape dhruvparanjape force-pushed the config_refactor branch 7 times, most recently from a0fb82c to b8759bf Compare August 25, 2024 17:56
@dhruvparanjape dhruvparanjape changed the title Config refactor Refactor ABSmartly configuration setup to allow for all the configuration to be specified through the ABSmartlyConfig object Aug 26, 2024
@dhruvparanjape dhruvparanjape marked this pull request as ready for review August 26, 2024 19:21
@hermeswaldemarin
Copy link
Contributor

Hey @dhruvCW , can you change the file lib/absmartly/version.rb with the version number 1.2 please?

@hermeswaldemarin
Copy link
Contributor

@dhruvCW , see if is possible to add this PR https://github.com/absmartly/ruby-sdk/pull/28/files together with this version, please?

@dhruvparanjape
Copy link
Author

@dhruvCW , see if is possible to add this PR https://github.com/absmartly/ruby-sdk/pull/28/files together with this version, please?

Done cherry picked the changes onto this branch and updated the version file as well 👍

@hermeswaldemarin hermeswaldemarin merged commit e7777fd into absmartly:main Sep 4, 2024
fcbr added a commit to catawiki/absmartly-ruby-sdk that referenced this pull request Jan 22, 2026
* Remove unused lib/absmartly/variant_assigner

* Support create context with given context data.

* Config refactor

* Add ruby version matrix to the CI

* remove bigdecimal as a dependency

* Fix relative path in DefaultContextEventHandler.

* Fix class inheritance in DefaultContextEventHandler.

* Update version

* fix: merge context attributes when setting them (absmartly#29)

* revert: undo config refactor from PR absmartly#27 (fixes deadlock) (absmartly#31)

* fix: address coderabbit comments (absmartly#32)

* fix: allow http client configuration from configure_client (absmartly#33)

* feat: add global cutom event logger  (absmartly#34)

---------

Co-authored-by: hermeswaldemarin <hermes@absmartly.com>
Co-authored-by: Márcio Martins <77632139+marcio-absmartly@users.noreply.github.com>
Co-authored-by: Hermes Waldemarin Neto <hermes.waldemarin@gmail.com>
Co-authored-by: Dhruv Paranjape <d.paranjape@catawiki.nl>
Co-authored-by: yektt <r.yekt.93@gmail.com>
Co-authored-by: Cal Courtney <calthejuggler@gmail.com>
Co-authored-by: Cal Courtney <cal@absmartly.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants